home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997 August / Macworld (1997-08).dmg / Shareware World / Comms & Internet / Big Brother 1.2 / Documentation / BrotherEvents.h next >
C/C++ Source or Header  |  1997-06-17  |  6KB  |  81 lines

  1. #pragma once
  2.  
  3. // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. // This file is best viewed in Geneva 9 on a 17" screen.
  5. // It documents the custom Apple events supported by Big Brother. It is to be used by programmers who want to make use of Big Brother's capabilities to enhance their applications.
  6. // If you are a programmer and if you need help implementing support for Big Brother, feel free to contact me at <pottier@kagi.com>.
  7.  
  8. #define            kAEBrotherSuite                'Bbth'
  9.  
  10. // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  11. // The Check Links event.
  12. // You might want to adjust Big Brother's settings (via Get Data and Set Data events) prior to sending this event. The Proxy and Link Check Options settings are relevant.
  13. // Be sure to restore settings immediately after sending the event, to avoid confusing the user.
  14.  
  15. #define            kAECheckLinks                    'Chck'
  16.  
  17. // Its direct parameter is a list of Apple event records. Each record must contain the following components:
  18.  
  19. #define                keyAbsoluteURL            'Url '                            // typeChar                // Absolute address to be checked
  20. #define                keyRefCon                    'Id# '                        // <any type t>                // Private data which will be returned to the caller in the reply events
  21.  
  22. // You can supply your process serial number explicitly, if you are running on the same machine as Big Brother. This helps Big Brother determine to whom the replies should be sent.
  23. // With Big Brother 1.1, this parameter must be supplied. With Big Brother 1.2 or later, it is optional: if it is missing, Big Brother will try to figure out which process sent the event and will reply
  24. // to it. Supplying it allows you to have fine control over who the replies are sent to; on the other hand, omitting it allows you to use the Check Links event even if you are not running on the same
  25. // machine as Big Brother.
  26.  
  27. #define            keyCallerPSN                    'cPSN'                        // typeProcessSerialNumber    // Identifies the process to which the reply events should be sent
  28.  
  29. // The caller can request that only unsuccessful checks be reported:
  30.  
  31. #define            keyUnsuccessfulOnly                '!Oly'                        // typeBoolean                // True if unsuccessful checks only should be reported, false otherwise
  32.  
  33. // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  34. // The Link Checked event.
  35. // After receiving a Check Links event, Big Brother sends a Link Checked event to the caller for each link checked.
  36.  
  37. #define            kAELinkChecked                    'Chkd'
  38.  
  39. // Its direct parameter is an Apple event record which contains the following components:
  40.  
  41. //                    keyRefCon                    'Id# '                        // <t>                    // Private data as read from the original Check Links event.
  42. #define                keyCheckResult                'CRes'                        // typeEnumerated            // Identifies the outcome of the check
  43.  
  44. // The following constants are defined for keyResult:
  45. // Note: other constants might be defined by future versions of Big Brother. If you encounter an unknown constant, consider it as a failure.
  46.  
  47. #define                    kAERemoteSuccess        'RSuc'                                                // Successful remote check
  48. #define                    kAELocalSuccess        'LSuc'                                                // Successful local check
  49. #define                    kAEServerFailed        'SFld'                                                // Successful connection, but the server returned an error code
  50. #define                    kAEMoved                'SMvd'                                                // Successful connection, but the document has moved
  51. #define                    kAESysFailed            'sFld'                                                // Unsuccessful check - some system call failed
  52. #define                    kAESyntax            'Sntx'                                                // Unsuccessful check - URL syntax error
  53.  
  54. // Some additional components are provided in certain cases:
  55.  
  56. #define                keyServerCode                'SCod'                        // typeLongInteger            // Server's HTTP result code (kAEServerFailed, kAEMoved)
  57. #define                keyNewURL                'nURL'                        // typeChar                // New document URL (kAEMoved)
  58. #define                keySystemCode                'sCod'                        // typeLongInteger            // System error code (kAESysFailed)
  59. #define                keySystemReason            'sRsn'                        // typeEnumerated            // Reason for the failure (kAESysFailed)
  60. #define                keyContentLength            'cLth'                        // typeLongInteger            // Document's length (kAERemoteSuccess, if provided by server)
  61. #define                keyLastModified            'cLsM'                        // typeLongDateTime        // Document's date (kAERemoteSuccess, if provided by server)
  62.  
  63. // The following constants are defined for keySystemReason:
  64. // Note: other constants might be defined by future versions of Big Brother.
  65.  
  66. #define                    kAEBaseNotAbsolute        'bnAb'                                                // The base URL (specified via BASE HREF) isn't absolute.
  67. #define                    kAENeedTCP            'nTCP'                                                // No TCP software is available.
  68. #define                    kAELocalFailure            'locF'                                                // The local link is broken.
  69. #define                    kAECantOpenEndpoint        'Open'                                                // Can't open an endpoint.
  70. #define                    kAECantBind            'Bind'                                                // Can't bind to a local address.
  71. #define                    kAECantResolve        'Rslv'                                                // Can't resolve host name.
  72. #define                    kAECantConnect        'Conn'                                                // Can't connect to remote host.
  73. #define                    kAECantSend            'Send'                                                // Can't send request to remote host.
  74. #define                    kAECantReceive        'Recv'                                                // Can't receive data from remote host
  75. #define                    kAECantDisconnect        'Disc'                                                // Can't disconnect.
  76. #define                    kAECantParseAnswer    'Pars'                                                // The server's answer doesn't conform to the HTTP/1.0 protocol
  77. #define                    kAEEmptyAnswer        'Empt'                                                // The server closed the connection without answering.
  78. #define                    kAEIncompleteTransfer    'IncT'                                                // The server transferred less data than promised.
  79. #define                    kAEServerWouldntDeliver    'SWDr'                                                // The server answered HEAD successfully but not GET
  80. #define                    kAENoTrailingSlash        'NTr/'                                                // Local URL should end with a slash because it points to a directory.
  81.